package com.homegoods.orderinfodetail.model;

import com.homegoods.orderinfodetail.item.CommentItem;
import com.kedll.library.adapter.MultiTypeAdapter;
import com.kedll.library.mvp.BaseModel;

import java.util.ArrayList;
import java.util.List;

/**
 * @author QiQi
 * @ClassName: CommentModel
 * @date 2018/9/21
 * @description 评价数据
 */
public class CommentModel extends BaseModel<CommentItem> {

    /**
     * 评论人的头像
     */
    private String headUrl;

    /**
     * 评论人的手机号
     */
    private String phoneNum;

    /**
     * 分数
     */
    private int score;
    /**
     * 评论时间
     */
    private String date;

    /**
     * 商品颜色
     */
    private String color;

    /**
     * 商品尺码
     */
    private String size;


    /**
     * 评论内容
     */
    private String comment;

    /**
     * 评论的图片
     */
    private List<String> imgs;

    /**
     * 点赞数
     */
    private String goodNum;

    /**
     * 是否点过赞 0 没有 1 有
     */
    private int haveGood;

    public String getHeadUrl() {
        return headUrl == null ? "" : headUrl;
    }

    public void setHeadUrl(String headUrl) {
        this.headUrl = headUrl;
    }

    public String getPhoneNum() {
        return phoneNum == null ? "" : phoneNum;
    }

    public void setPhoneNum(String phoneNum) {
        this.phoneNum = phoneNum;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }

    public String getDate() {
        return date == null ? "" : date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public String getColor() {
        return color == null ? "" : color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public String getSize() {
        return size == null ? "" : size;
    }

    public void setSize(String size) {
        this.size = size;
    }

    public String getComment() {
        return comment == null ? "" : comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public List<String> getImgs() {
        if (imgs == null) {
            return new ArrayList<>();
        }
        return imgs;
    }

    public void setImgs(List<String> imgs) {
        this.imgs = imgs;
    }

    public String getGoodNum() {
        return goodNum == null ? "" : goodNum;
    }

    public void setGoodNum(String goodNum) {
        this.goodNum = goodNum;
    }

    public int getHaveGood() {
        return haveGood;
    }

    public void setHaveGood(int haveGood) {
        this.haveGood = haveGood;
    }

    @Override
    public CommentItem createItem(MultiTypeAdapter adapter) {
        return new CommentItem(this, adapter);
    }
}
